package com.innerclass.anonymous.demo4;

public class ServiceImpl2 implements Service {

	private ServiceImpl2() {

	}

	@Override
	public void method1() {
		System.out.println("ServiceImpl2 method1");
	}

	@Override
	public void method2() {
		System.out.println("ServiceImpl2 method2");
	}

	public static ServiceFactory factory() {
		return new ServiceFactory() {

			@Override
			public Service getService() {
				return new ServiceImpl2();
			}

		};
	}

}
